import '../utils/tools.dart';

class SiteinfoModel {
  String webname = '';
  String keywords = '';
  String description = '';
  String weblogo = '';
  String url = '';
  String name = '';
  String address = '';
  String location = '';
  String shareimg = '';

  SiteinfoModel();

  SiteinfoModel.fromJson(Map? siteinfo) {
    if (siteinfo == null || siteinfo.isEmpty) return;

    webname = siteinfo['webname'] ?? '';
    keywords = siteinfo['keywords'] ?? '';
    description = siteinfo['description'] ?? '';
    weblogo = Tools.fixImageUrl(siteinfo['weblogo']);
    shareimg = Tools.fixImageUrl(siteinfo['shareimg']);

    url = siteinfo['url'] ?? '';
    name = siteinfo['name'] ?? '';
    address = siteinfo['address'] ?? '';
    location = siteinfo['location'] ?? '';
  }
}
